﻿using Ops.Mpc.States;
using Ops.Mpc.ExampleApplication.Models;

namespace Ops.Mpc.ExampleApplication.Actions
{
    public class SetMainMessageStateAction : StateAction
    {
        public string MessageId
        {
            get;
            set;
        }

        protected override void OnExecute(object context)
        {
            base.OnExecute(context);
            MessageModel messageModel = this.GetModel<MessageModel>();
            messageModel.MainMessage = StringResources.ResourceManager.GetString(MessageId);
            this.Finish();
        }
    }
}
